<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['namespace' => 'Auth'], function () {
    Route::post('/login', 'AuthController@login');
    Route::post('/otp-login', 'OtpAuthController@otpLogin');
});

Route::group(['middleware' => ['auth:api']], function () {
    require __DIR__ . '/api/auth.php';
    require __DIR__ . '/api/user.php';
    require __DIR__ . '/api/permission.php';
});
